package com.frejoys.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frejoys.common.vo.agent.AgentRoleVo;
import com.frejoys.dao.entity.AgentRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AgentRoleMapper extends BaseMapper<AgentRole> {

    //查找父级id层级关系
    @Select("select path from j_agent_role where id = #{pid}")
    String getPidPath(@Param("pid") Integer pid);

    //后台查询代理角色
    List<AgentRoleVo> listAgentRole();

}
